export class Realm {
  readonly global = new Map<string, string>();
  readonly Object = new Map<string, string>();
  readonly Object_Prototype = new Map<string, string>();

  
}

export class EnvironmentRecord {
  private thisValue: any;
  private variables = new Map<string, string>();
  private outer = null;
}


export class ExecutionContext {


  constructor(
    readonly realm: Realm,
      // 词法环境
    readonly lexicalEnvironment: Record<string, any>,

    // 变量环境
    readonly variableEnvironment = lexicalEnvironment,
  ) {
    
  }
}

export class Reference {
  constructor(private object: Record<string, any>, private property: string) {

  }

  set(value: any) {
    this.object[this.property] = value;
  }

  get() {
    return this.object[this.property];
  }
}

